<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <title>题目</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" href="__JS__/layui/css/layui.css" media="all">
        <link rel="stylesheet" href="__CSS__/font-awesome.min.css">
        <!--CSS引用-->
        <link rel="stylesheet" href="__CSS__/index.css">
        <!--[if lt IE 9]>
        <script src="__CSS__/html5shiv.min.js"></script>
        <script src="__CSS__/respond.min.js"></script>
        <![endif]-->
        <style>
            html,body{background:#f2f2f2;height: 100%;}
            .layui-input{width:75%;}
            .user {width:100%;_height:450px;min-height:450px;background:#f2f2f2;padding-top:85px;padding-bottom:40px;}
            .reg {padding-top:5px;}
            .user .layui-main{height:100%}
            .user .main{width:450px;min-height:200px;padding:1rem 3.25rem 1.2rem;background:#fff;margin:0 auto;max-width:450px;position:relative;top:90px;width:100%;z-index:5;-moz-transition-property:all;-o-transition-property:all;-webkit-transition-property:all;transition-property:all;-moz-transition-duration:.3s;-o-transition-duration:.3s;-webkit-transition-duration:.3s;transition-duration:.3s}
            .user .page-title{position:relative;font-size:18px;margin:0 0 30px;padding:10px 15px;line-height:30px;border-bottom:1px solid #DFDFDF}
            .user .page-title a{float: right;font-size:14px;color:#f30;}	
            .user .tk input {display: inline-block;}
            .user .tk .layui-form-checkbox {display:none;}    
        </style>
    </head>

<body>
<div class="layui-main user" >
    <div class="layui-clear main">
        <h2 class="page-title">用户登陆</h2>
        <div class="layui-form">
            <form class="layui-form" action="{:url('index/login/index')}" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label">用户名：</label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="account" placeholder="在此输入用户名/手机号" type="text" required="" autocomplete="off" value="">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">密码：</label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="userPassword" placeholder="在此输入密码" type="password" required="" lay-verify="required" autocomplete="off">
                    </div>
                </div>
<!--                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="cscms" value="ok" title="是否为原CSCMS用户"><div class="layui-unselect layui-form-checkbox"><span>是否为原CSCMS用户</span><i class="layui-icon"></i></div>
                    </div>
                </div>-->
<!--                <div class="layui-form-item">
                    <span style="float: left;">
                        没有账号？ <a href="/user/reg">点击注册</a>
                    </span>
                    <span style="float: right;">
                        忘记密码？ <a href="/user/pass">点击找回</a>
                    </span>
                </div>-->
                <div class="layui-form-item">
                    <button type="submit" class="layui-btn layui-btn-big" style="width: 100%" lay-filter="*" lay-submit="">立即登陆</button>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/layui/lay/dest/layui.all.js"></script>
<script>
var layer = layui.layer,
element = layui.element(),
laydate = layui.laydate,
form = layui.form();
form.on('submit(*)', function (data) {
    $.ajax({
        url: data.form.action,
        type: data.form.method,
        data: $(data.form).serialize(),
        success: function (info) {
            
            if (info.code === 1) {
                setTimeout(function () {
                    location.href = info.url;
                }, 1000);
            }
            layer.msg(info.msg);
        }
    });

    return false;
});    
</script>
</body>
</html>